#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int add(int x)
{
    int y = 0;
    scanf("%d", &y);
    return x + y;
}
int jian(int x)
{
    int y = 0;
    scanf("%d", &y);
    return x - y;
}
int cheng(int x)
{
    int y = 0;
    scanf("%d", &y);
    return x * y;
}

int main()
{
    int x = 0;
    char y = 0;
    scanf("%d", &x);
    while (1)
    {
        scanf("%c", &y);
        if (y == '=')
        {
            printf("%d", x);
            break;
        }
        else if (y == '+')
            x = add(x);
        else if (y == '-')
            x = jian(x);
        else if (y == '*')
            x = cheng(x);
        else if (y == '/')
        {
            int o = 0;
            scanf("%d", &o);
            if (0 == o)
            {
                printf("ERROR\n");
                break;
            }
            else
            {
                x = x / o;
            }
        }
        else
        {
            printf("ERROR\n");
            break;
        }
    }
    return 0;
}